package businesslogic.plan;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import vo.publishplanvo.PlanVO;
import businesslogicservice.PlanControllerImpli;
import businesslogicservice.planblservice.PublishPlanBLService;
import businesslogicservice.planblservice.ShowPlanBLService;
import Enum.Faculty;
import Enum.ResultMessage;

public class PlanController extends UnicastRemoteObject implements PlanControllerImpli{
	
	public PlanController() throws RemoteException{
		
	}
	
	public String showPlan(PlanVO planVO) throws RemoteException{
		String plan;
		ShowPlanBLService showPlan = new ShowPlan();
		Faculty faculty= planVO.getFaculty();
		showPlan.setFaculty(faculty);
		plan = showPlan.getPlan();
		return plan;
	}
	
	public ResultMessage publishPlan(PlanVO planVO) throws RemoteException{
		PublishPlanBLService publishPlan = new PublishPlan();
		ResultMessage resultMessage = publishPlan.setInformation(planVO);
		return resultMessage;	
	}

}
